import request from '@/router/axios';

export const peopleList = (current, size, params) => {
  return request({
    url: '/api/rb-oem/oem/seller/peopleList',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const peopleInfo = (id) => {
  return request({
    url: '/api/rb-oem/oem/seller/peopleInfo',
    method: 'get',
    params: {
      id
    }
  })
}

export const addPeople = (row) => {
  return request({
    url: '/api/rb-oem/oem/seller/addPeople',
    method: 'post',
    data: row
  })
}

export const delPeople = (id) => {
  return request({
    url: '/api/rb-oem/oem/seller/delPeople',
    method: 'get',
    params: {
      id,
    }
  })
}

export const addressList = (current, size, params) => {
  return request({
    url: '/api/rb-oem/oem/seller/addressList',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const addressInfo = (id) => {
  return request({
    url: '/api/rb-oem/oem/seller/addressInfo',
    method: 'get',
    params: {
      id
    }
  })
}

export const addAddress = (row) => {
  return request({
    url: '/api/rb-oem/oem/seller/addAddress',
    method: 'post',
    data: row
  })
}

export const delAddress = (id) => {
  return request({
    url: '/api/rb-oem/oem/seller/delAddress',
    method: 'get',
    params: {
      id,
    }
  })
}

export const bankList = (current, size, params) => {
  return request({
    url: '/api/rb-oem/oem/seller/bankList',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const bankInfo = (id) => {
  return request({
    url: '/api/rb-oem/oem/seller/bankInfo',
    method: 'get',
    params: {
      id
    }
  })
}

export const addBank = (row) => {
  return request({
    url: '/api/rb-oem/oem/seller/addBank',
    method: 'post',
    data: row
  })
}

export const delBank = (id) => {
  return request({
    url: '/api/rb-oem/oem/seller/delBank',
    method: 'get',
    params: {
      id,
    }
  })
}